package kotlinquanweizhinan.chapt08.位运算

class test {
}

fun main() {
    println(Integer.toBinaryString(42))
    println(42.shl(2))
    println(Integer.toBinaryString(42.shl(2)))
    println(42.shr(2))
    println(Integer.toBinaryString(42.shr(2)))
    println(42.inv())
    println(Integer.toBinaryString(42.inv()))

    println(42.xor(33))
    println(Integer.toBinaryString(42.xor(33)))

    println(42.and(10))
    println(Integer.toBinaryString(42.and(10)))


}